import {createApp} from 'vue'
import App from './App.vue'
createApp(App).mount('#app')

// 学习axios 
import axios from 'axios'
type ChannelRes={
    data:{
        // 对象类型的数组
        channels:{
            id:number
            name:string
        }[]
    }
    message:string
}
async function getChannels(){
const res=await axios.get<ChannelRes>('http://geek.itheima.net/v1_0/channels')
console.log(res.data.data.channels[0].name)
}
getChannels()